package nc.ui.tc.BDGT_ATTACH;

import nc.ui.pub.bill.BillCardPanel;
import nc.ui.pub.bill.BillListPanel;
import nc.ui.pub.config.VarConfig;

public class HiddenItems {

	public static void hiddenI(BillListPanel billListPanel,boolean showOrHidden) {
		int key = 0;
		try {
			key = Integer.valueOf(VarConfig.get("MonthKey").toString());
		} catch (Exception e) {
			key=0;
		}
		String[] items = null;

		switch (key) {
		case 1:
			items = new String[] { "mfee1","mcapital1","m1creator","m1createdate"};
			break;
		case 2:
			items = new String[] { "mfee2","mcapital2","m2creator","m2createdate"};
			break;
		case 3:
			items = new String[] { "mfee3","mcapital3","m3creator","m3createdate" };
			break;
		case 4:
			items = new String[] { "mfee4","mcapital4","m4creator","m4createdate"};
			break;
		case 5:
			items = new String[] {"mfee5","mcapital5","m5creator","m5createdate"};
			break;
		case 6:
			items = new String[] { "mfee6","mcapital6","m6creator","m6createdate"};
			break;
		case 7:
			items = new String[] { "mfee7","mcapital7","m7creator","m7createdate"};
			break;
		case 8:
			items = new String[] { "mfee8","mcapital8","m8creator","m8createdate"};
			break;
		case 9:
			items = new String[] { "mfee9","mcapital9","m9creator","m9createdate"};
			break;
		case 10:
			items = new String[] { "mfee10","mcapital10","m10creator","m10createdate"};
			break;
		case 11:
			items = new String[] { "mfee11","mcapital11","m11creator","m11createdate"};
			break;
		case 12:
			items = new String[] { "mfee12","mcapital12","m12creator","m12createdate"};
			break;
		default:
			 items = new String[] {
				"mfee1","mcapital1","m1creator","m1createdate",
				"mfee2","mcapital2","m2creator","m2createdate",
				"mfee3","mcapital3","m3creator","m3createdate",
				"mfee4","mcapital4","m4creator","m4createdate",
				"mfee5","mcapital5","m5creator","m5createdate",
				"mfee6","mcapital6","m6creator","m6createdate",
				"mfee7","mcapital7","m7creator","m7createdate",
				"mfee8","mcapital8","m8creator","m8createdate",
				"mfee9","mcapital9","m9creator","m9createdate",
				"mfee10","mcapital10","m10creator","m10createdate",
				"mfee11","mcapital11","m11creator","m11createdate",
				"mfee12","mcapital12","m12creator","m12createdate"
				};
			break;
		}

		for (int i = 0; i < items.length; i++) {
			if((items[i].endsWith("creator")&&!showOrHidden)||(items[i].endsWith("createdate")&&!showOrHidden))
				continue;
			billListPanel.showHeadTableCol(items[i]);
		}
	}
}
